<!-- build time:Wed Dec 30 2020 09:55:48 GMT+0800 (中国标准时间) --><!DOCTYPE html><html lang="zh-CN"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=2"><meta name="theme-color" content="#222"><meta name="generator" content="Hexo 4.2.1"><link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon-next.png"><link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32-next.png"><link rel="icon" type="image/png" sizes="16x16" href="/images/favicon-16x16-next.png"><link rel="mask-icon" href="/images/logo.svg" color="#222"><link rel="stylesheet" href="/css/main.css"><link rel="stylesheet" href="/lib/font-awesome/css/all.min.css"><link rel="stylesheet" href="//cdn.jsdelivr.net/gh/fancyapps/fancybox@3/dist/jquery.fancybox.min.css"><script id="hexo-configurations">var NexT=window.NexT||{},CONFIG={hostname:"allens.icu",root:"/",scheme:"Pisces",version:"7.8.0",exturl:!1,sidebar:{position:"left",display:"post",padding:18,offset:12,onmobile:!1},copycode:{enable:!0,show_result:!0,style:"mac"},back2top:{enable:!0,sidebar:!0,scrollpercent:!0},bookmark:{enable:!1,color:"#222",save:"auto"},fancybox:!0,mediumzoom:!1,lazyload:!0,pangu:!1,comments:{style:"tabs",active:null,storage:!0,lazyload:!1,nav:null},algolia:{hits:{per_page:10},labels:{input_placeholder:"Search for Posts",hits_empty:"We didn't find any results for the search: ${query}",hits_stats:"${hits} results found in ${time} ms"}},localsearch:{enable:!0,trigger:"auto",top_n_per_article:1,unescape:!1,preload:!1},motion:{enable:!0,async:!1,transition:{post_block:"fadeIn",post_header:"slideDownIn",post_body:"slideDownIn",coll_header:"slideLeftIn",sidebar:"slideUpIn"}},path:"search.xml"}</script><meta name="description" content="精于心，简于形一个主题，三种外观，选您所好通过主题中的主题（亦称 Scheme），您可以方便地改变您博客的外观，同时几乎所有配置同样适用"><meta property="og:type" content="article"><meta property="og:title" content="Hexo-Next主题配置"><meta property="og:url" content="https://allens.icu/posts/f5a01bc1/index.html"><meta property="og:site_name" content="在雨季等你"><meta property="og:description" content="精于心，简于形一个主题，三种外观，选您所好通过主题中的主题（亦称 Scheme），您可以方便地改变您博客的外观，同时几乎所有配置同样适用"><meta property="og:locale" content="zh_CN"><meta property="og:image" content="http://allens-blog.oss-cn-beijing.aliyuncs.com/2020-06-08-WeChat5c13b918517ef23b43563785d8b65503.png"><meta property="article:published_time" content="2020-06-07T15:22:30.000Z"><meta property="article:modified_time" content="2020-10-27T11:34:12.615Z"><meta property="article:author" content="在雨季等你"><meta property="article:tag" content="Hexo"><meta name="twitter:card" content="summary"><meta name="twitter:image" content="http://allens-blog.oss-cn-beijing.aliyuncs.com/2020-06-08-WeChat5c13b918517ef23b43563785d8b65503.png"><link rel="canonical" href="https://allens.icu/posts/f5a01bc1/"><script id="page-configurations">CONFIG.page={sidebar:"",isHome:!1,isPost:!0,lang:"zh-CN"}</script><title>Hexo-Next主题配置 | 在雨季等你</title><noscript><style>.sidebar-inner,.use-motion .brand,.use-motion .collection-header,.use-motion .comments,.use-motion .menu-item,.use-motion .pagination,.use-motion .post-block,.use-motion .post-body,.use-motion .post-header{opacity:initial}.use-motion .site-subtitle,.use-motion .site-title{opacity:initial;top:initial}.use-motion .logo-line-before i{left:initial}.use-motion .logo-line-after i{right:initial}</style></noscript></head><body itemscope itemtype="http://schema.org/WebPage"><div class="container use-motion"><div class="headband"></div><header class="header" itemscope itemtype="http://schema.org/WPHeader"><div class="header-inner"><div class="site-brand-container"><div class="site-nav-toggle"><div class="toggle" aria-label="切换导航栏"><span class="toggle-line toggle-line-first"></span> <span class="toggle-line toggle-line-middle"></span> <span class="toggle-line toggle-line-last"></span></div></div><div class="site-meta"><a href="/" class="brand" rel="start"><span class="logo-line-before"><i></i></span><h1 class="site-title">在雨季等你</h1><span class="logo-line-after"><i></i></span></a></div><div class="site-nav-right"><div class="toggle popup-trigger"><i class="fa fa-search fa-fw fa-lg"></i></div></div></div><nav class="site-nav"><ul id="menu" class="main-menu menu"><li class="menu-item menu-item-home"><a href="/" rel="section"><i class="home fa-fw"></i>首页</a></li><li class="menu-item menu-item-about"><a href="/about/" rel="section"><i class="user fa-fw"></i>关于</a></li><li class="menu-item menu-item-tags"><a href="/tags/" rel="section"><i class="tags fa-fw"></i>标签<span class="badge">6</span></a></li><li class="menu-item menu-item-categories"><a href="/categories/" rel="section"><i class="th fa-fw"></i>分类<span class="badge">7</span></a></li><li class="menu-item menu-item-archives"><a href="/archives/" rel="section"><i class="archive fa-fw"></i>归档<span class="badge">23</span></a></li><li class="menu-item menu-item-search"><a role="button" class="popup-trigger"><i class="fa fa-search fa-fw"></i>搜索</a></li></ul></nav><div class="search-pop-overlay"><div class="popup search-popup"><div class="search-header"><span class="search-icon"><i class="fa fa-search"></i></span><div class="search-input-container"><input autocomplete="off" autocapitalize="off" placeholder="搜索..." spellcheck="false" type="search" class="search-input"></div><span class="popup-btn-close"><i class="fa fa-times-circle"></i></span></div><div id="search-result"><div id="no-result"><i class="fa fa-spinner fa-pulse fa-5x fa-fw"></i></div></div></div></div></div></header><main class="main"><div class="main-inner"><div class="content-wrap"><div class="content post posts-expand"><article itemscope itemtype="http://schema.org/Article" class="post-block" lang="zh-CN"><link itemprop="mainEntityOfPage" href="https://allens.icu/posts/f5a01bc1/"><span hidden itemprop="author" itemscope itemtype="http://schema.org/Person"><meta itemprop="image" content="/images/heard.jpg"><meta itemprop="name" content="在雨季等你"><meta itemprop="description" content="分享是进步最快的方式"></span><span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization"><meta itemprop="name" content="在雨季等你"></span><header class="post-header"><h1 class="post-title" itemprop="name headline">Hexo-Next主题配置</h1><div class="post-meta"><span class="post-meta-item"><span class="post-meta-item-icon"><i class="far fa-calendar"></i> </span><span class="post-meta-item-text">发表于</span> <time title="创建时间：2020-06-07 23:22:30" itemprop="dateCreated datePublished" datetime="2020-06-07T23:22:30+08:00">2020-06-07</time> </span><span class="post-meta-item"><span class="post-meta-item-icon"><i class="far fa-calendar-check"></i> </span><span class="post-meta-item-text">更新于</span> <time title="修改时间：2020-10-27 19:34:12" itemprop="dateModified" datetime="2020-10-27T19:34:12+08:00">2020-10-27</time> </span><span class="post-meta-item"><span class="post-meta-item-icon"><i class="far fa-folder"></i> </span><span class="post-meta-item-text">分类于</span> <span itemprop="about" itemscope itemtype="http://schema.org/Thing"><a href="/categories/Hexo/" itemprop="url" rel="index"><span itemprop="name">Hexo</span></a> </span></span><span class="post-meta-item"><span class="post-meta-item-icon"><i class="far fa-comment"></i> </span><span class="post-meta-item-text">评论数：</span> <a title="valine" href="/posts/f5a01bc1/#valine-comments" itemprop="discussionUrl"><span class="post-comments-count valine-comment-count" data-xid="/posts/f5a01bc1/" itemprop="commentCount"></span></a></span><br><span class="post-meta-item" title="本文字数"><span class="post-meta-item-icon"><i class="far fa-file-word"></i> </span><span class="post-meta-item-text">本文字数：</span> <span>21k</span> </span><span class="post-meta-item" title="阅读时长"><span class="post-meta-item-icon"><i class="far fa-clock"></i> </span><span class="post-meta-item-text">阅读时长 &asymp;</span> <span>19 分钟</span></span></div></header><div class="post-body" itemprop="articleBody"><p>精于心，简于形<br>一个主题，三种外观，选您所好<br>通过主题中的主题（亦称 Scheme），您可以方便地改变您博客的外观，同时几乎所有配置同样适用</p><a id="more"></a><h2 id="下载-NexT"><a href="#下载-NexT" class="headerlink" title="下载 NexT"></a>下载 NexT</h2><p>首先下载 NexT 这里需要注意一下，github 上能找到两个 最好使用 后面你的 一个 <a href="https://github.com/theme-next/hexo-theme-next" target="_blank" rel="noopener">hexo-theme-next官网</a> 版本，现在还在继续更新中</p><ul><li><p><a href="https://github.com/iissnan/hexo-theme-next/releases" target="_blank" rel="noopener">5.1.4版本 停止维护</a></p></li><li><p><a href="https://github.com/theme-next/hexo-theme-next" target="_blank" rel="noopener">hexo-theme-next官网</a></p></li></ul><h3 id="推荐使用git-下载"><a href="#推荐使用git-下载" class="headerlink" title="推荐使用git 下载"></a>推荐使用git 下载</h3><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">$ cd your-hexo-site</span><br><span class="line">$ git clone https:&#x2F;&#x2F;github.com&#x2F;theme-next&#x2F;hexo-theme-next.git themes&#x2F;next</span><br></pre></td></tr></table></figure><h3 id="下载zip"><a href="#下载zip" class="headerlink" title="下载zip"></a>下载zip</h3><p>当然也可以 前往 NexT 版本 <a href="https://github.com/theme-next/hexo-theme-next/releases" target="_blank" rel="noopener">发布页面</a>直接下载 将next文件夹移入 blog 所在的文件夹的 themes 文件夹</p><h2 id="修改主题"><a href="#修改主题" class="headerlink" title="修改主题"></a>修改主题</h2><blockquote><p>站点配置文件 ====&gt; hexo自带的_config.yml</p></blockquote><blockquote><p>主题配置文件 ====&gt; 主题theme下的_config.yml</p></blockquote><p>修改 站点配置文件</p><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line"># Extensions</span><br><span class="line">## Plugins: https:&#x2F;&#x2F;hexo.io&#x2F;plugins&#x2F;</span><br><span class="line">## Themes: https:&#x2F;&#x2F;hexo.io&#x2F;themes&#x2F;</span><br><span class="line">theme: next</span><br></pre></td></tr></table></figure><h3 id="添加-next-yml-文件"><a href="#添加-next-yml-文件" class="headerlink" title="添加 next.yml 文件"></a>添加 next.yml 文件</h3><p>当前更新 NexT 主题并不顺利。通过 git pull 升级 NexT 主题时，它经常会陷入冲突状态，然后我们只能手动合并配置</p><p>解决办法</p><ul><li><p><a href="https://github.com/theme-next/hexo-theme-next/blob/master/docs/zh-CN/DATA-FILES.md" target="_blank" rel="noopener">官方原文</a></p></li><li><p><a href="https://tding.top/docs/getting-started/data-files.html" target="_blank" rel="noopener">其他博主分享的</a></p></li></ul><blockquote><p>下面我会采用 NexT 提供的方法 <code>override: false</code> 方式进行使用</p></blockquote><h3 id="站点配置"><a href="#站点配置" class="headerlink" title="站点配置"></a>站点配置</h3><p>在 站点配置文件 中进行配置</p><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br></pre></td><td class="code"><pre><span class="line"># Site</span><br><span class="line">title: 在雨季等你         # 网站标题</span><br><span class="line">subtitle:       # 网站副标题</span><br><span class="line">description: 分享是进步最快的方式   # 描述，介绍网站的</span><br><span class="line">keywords:       # 网站的关键字</span><br><span class="line">author: 在雨季等你        # 博主姓名</span><br><span class="line">language: zh-CN # 语言：zh-CN 是简体中文</span><br><span class="line">timezone: UTC   # 时区</span><br></pre></td></tr></table></figure><h3 id="修改主题配置主题"><a href="#修改主题配置主题" class="headerlink" title="修改主题配置主题"></a>修改主题配置主题</h3><p>在 <code>数据文件</code> 中介绍了 需要在 <code>blog/source/_data</code>下新建一个 <code>next.yml</code></p><p>这里我们使用 <code>override: false</code> 的方式,在 <code>next.yml</code>中新添加</p><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line"># ---------------------------------------------------------------</span><br><span class="line"># 兼容模式</span><br><span class="line"># ---------------------------------------------------------------</span><br><span class="line">override: false</span><br></pre></td></tr></table></figure><p>添加主题已经修改主题</p><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br></pre></td><td class="code"><pre><span class="line"># ---------------------------------------------------------------</span><br><span class="line"># 主题样式</span><br><span class="line"># ---------------------------------------------------------------</span><br><span class="line"># Schemes</span><br><span class="line"># scheme: Muse</span><br><span class="line"># scheme: Mist</span><br><span class="line">scheme: Pisces</span><br><span class="line"># scheme: Gemini</span><br></pre></td></tr></table></figure><h3 id="菜单设置为-菜单名-菜单目录-菜单图标名字"><a href="#菜单设置为-菜单名-菜单目录-菜单图标名字" class="headerlink" title="菜单设置为 菜单名: /菜单目录 || 菜单图标名字"></a>菜单设置为 菜单名: /菜单目录 || 菜单图标名字</h3><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br></pre></td><td class="code"><pre><span class="line"># ---------------------------------------------------------------</span><br><span class="line"># 菜单设置为 菜单名: &#x2F;菜单目录 || 菜单图标名字</span><br><span class="line"># ---------------------------------------------------------------</span><br><span class="line">menu:</span><br><span class="line">  home: &#x2F; || home   #主页</span><br><span class="line">  about: &#x2F;about&#x2F; || user  #关于</span><br><span class="line">  tags: &#x2F;tags&#x2F; || tags   #标签</span><br><span class="line">  categories: &#x2F;categories&#x2F; || th  #分类</span><br><span class="line">  archives: &#x2F;archives&#x2F; || archive  #归档</span><br><span class="line">  #schedule: &#x2F;schedule&#x2F; || calendar  #日程表</span><br><span class="line">  #sitemap: &#x2F;sitemap.xml || sitemap   #站点地图</span><br><span class="line">  #commonweal: &#x2F;404&#x2F; || heartbeat    #公益404</span><br><span class="line"></span><br><span class="line">menu_settings:</span><br><span class="line">  icons: true   # 显示图标</span><br><span class="line">  badges: true  # 显示统计信息</span><br></pre></td></tr></table></figure><blockquote><p>点击关于界面无法打开</p></blockquote><p>终端回到blog的根目录.运行：</p><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">hexo new page &quot;tags&quot;</span><br></pre></td></tr></table></figure><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">hexo new page &quot;categories&quot;</span><br></pre></td></tr></table></figure><h3 id="社交栏设置"><a href="#社交栏设置" class="headerlink" title="社交栏设置"></a>社交栏设置</h3><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br></pre></td><td class="code"><pre><span class="line"># ---------------------------------------------------------------</span><br><span class="line"># 社交栏设置</span><br><span class="line"># ---------------------------------------------------------------</span><br><span class="line">social:</span><br><span class="line">  GitHub: https:&#x2F;&#x2F;github.com&#x2F;JiangHaiYang01 || github   #网站名：网址 ||图标名</span><br><span class="line">  简书: https:&#x2F;&#x2F;www.jianshu.com&#x2F;u&#x2F;142e8a9d9d71 || heartbeat</span><br><span class="line">  #E-Mail: mailto:yourname@gmail.com || envelope</span><br><span class="line">  #Google: https:&#x2F;&#x2F;plus.google.com&#x2F;yourname || google</span><br><span class="line">  #Twitter: https:&#x2F;&#x2F;twitter.com&#x2F;yourname || twitter</span><br><span class="line">  #FB Page: https:&#x2F;&#x2F;www.facebook.com&#x2F;yourname || facebook</span><br><span class="line">  #VK Group: https:&#x2F;&#x2F;vk.com&#x2F;yourname || vk</span><br><span class="line">  #StackOverflow: https:&#x2F;&#x2F;stackoverflow.com&#x2F;yourname || stack-overflow</span><br><span class="line">  #YouTube: https:&#x2F;&#x2F;youtube.com&#x2F;yourname || youtube</span><br><span class="line">  #Instagram: https:&#x2F;&#x2F;instagram.com&#x2F;yourname || instagram</span><br><span class="line">  #Skype: skype:yourname?call|chat || skype</span><br><span class="line">social_icons:</span><br><span class="line">  enable: true      # 显示社交图标</span><br><span class="line">  icons_only: false # 只显示图标，不显示文字</span><br><span class="line">  transition: false</span><br></pre></td></tr></table></figure><h3 id="个人头像设置"><a href="#个人头像设置" class="headerlink" title="个人头像设置"></a>个人头像设置</h3><p>要设置自己的侧边栏头像，首先，准备一张头像的图片，命名为 <code>avatar.jpg</code>，然后，将图片放在<code>/blog/themes/next/source/images/</code>文件夹下</p><p>接着 在 <code>next.yml</code>中 添加</p><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br></pre></td><td class="code"><pre><span class="line"># ---------------------------------------------------------------</span><br><span class="line"># 个人头像设置</span><br><span class="line"># ---------------------------------------------------------------</span><br><span class="line">avatar:</span><br><span class="line">  # Replace the default image and set the url here.</span><br><span class="line">  url: &#x2F;images&#x2F;heard.jpg</span><br><span class="line">  # If true, the avatar will be dispalyed in circle.</span><br><span class="line">  rounded: true</span><br><span class="line">  # If true, the avatar will be rotated with the cursor.</span><br><span class="line">  rotated: false</span><br></pre></td></tr></table></figure><h3 id="站内搜索功能的实现"><a href="#站内搜索功能的实现" class="headerlink" title="站内搜索功能的实现"></a>站内搜索功能的实现</h3><p>终端进入blog的根目录下，执行以下命令</p><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">npm install hexo-generator-searchdb --save</span><br></pre></td></tr></table></figure><p>添加</p><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br></pre></td><td class="code"><pre><span class="line"></span><br><span class="line"># ---------------------------------------------------------------</span><br><span class="line"># 本地搜索</span><br><span class="line"># 安装插件 npm install hexo-generator-searchdb --save</span><br><span class="line"># ---------------------------------------------------------------</span><br><span class="line">local_search:</span><br><span class="line">  enable: true</span><br><span class="line">  # If auto, trigger search by changing input.</span><br><span class="line">  # If manual, trigger search by pressing enter key or search button.</span><br><span class="line">  trigger: auto</span><br><span class="line">  # Show top n results per article, show all results by setting to -1</span><br><span class="line">  top_n_per_article: 1</span><br><span class="line">  # Unescape html strings to the readable one.</span><br><span class="line">  unescape: false</span><br><span class="line">  # Preload the search data when the page loads.</span><br><span class="line">  preload: false</span><br></pre></td></tr></table></figure><h3 id="添加评论"><a href="#添加评论" class="headerlink" title="添加评论"></a>添加评论</h3><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br></pre></td><td class="code"><pre><span class="line"># ---------------------------------------------------------------</span><br><span class="line"># 留言 Valine</span><br><span class="line"># ---------------------------------------------------------------</span><br><span class="line"># Valine</span><br><span class="line"># For more information: https:&#x2F;&#x2F;valine.js.org, https:&#x2F;&#x2F;github.com&#x2F;xCss&#x2F;Valine</span><br><span class="line">valine:</span><br><span class="line">  enable: true</span><br><span class="line">  appid:  # Your leancloud application appid</span><br><span class="line">  appkey: # Your leancloud application appkey</span><br><span class="line">  notify: false # 是否开启邮件提醒</span><br><span class="line">  verify: false # Verification code</span><br><span class="line">  placeholder: 欢迎吐槽  # Comment box placeholder</span><br><span class="line">  avatar: mm # Gravatar style</span><br><span class="line">  guest_info: nick,mail,link # Custom comment header</span><br><span class="line">  pageSize: 10 # Pagination size</span><br><span class="line">  language: zh-cn # Language, available values: en, zh-cn</span><br><span class="line">  visitor: false # Article reading statistic</span><br><span class="line">  comment_count: false # 如果为假，评论计数将只显示在发布页面，而不是主页</span><br><span class="line">  recordIP: false # Whether to record the commenter IP</span><br><span class="line">  serverURLs: # When the custom domain name is enabled, fill it in here (it will be detected automatically by default, no need to fill in)</span><br><span class="line">  #post_meta_order: 0</span><br></pre></td></tr></table></figure><blockquote><p>Valine 评论开启后，标题下方显示的是「Valine: 0」而不是「评论数：0」</p></blockquote><p>在主题文件夹下的 languages 文件夹中，修改 zh-CN.yml，在 “post:” 下添加子字段 “comments.valine: 评论数”</p><h3 id="首页文章属性"><a href="#首页文章属性" class="headerlink" title="首页文章属性"></a>首页文章属性</h3><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br></pre></td><td class="code"><pre><span class="line"># ---------------------------------------------------------------</span><br><span class="line"># 首页文章属性</span><br><span class="line"># ---------------------------------------------------------------</span><br><span class="line">post_meta:</span><br><span class="line">  item_text: true     # 设为true 可以一行显示，文章的所有属性</span><br><span class="line">  created_at: true    # 显示创建时间</span><br><span class="line">  updated_at:</span><br><span class="line">    enabled: true     # 显示修改的时间</span><br><span class="line">    another_day: true # 设true时，如果创建时间和修改时间一样则显示一个时间</span><br><span class="line">  categories: true    # 显示分类信息</span><br></pre></td></tr></table></figure><h3 id="内容页里的代码块新增复制按钮"><a href="#内容页里的代码块新增复制按钮" class="headerlink" title="内容页里的代码块新增复制按钮"></a>内容页里的代码块新增复制按钮</h3><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br></pre></td><td class="code"><pre><span class="line"># ---------------------------------------------------------------</span><br><span class="line"># 内容页里的代码块新增复制按钮</span><br><span class="line"># ---------------------------------------------------------------</span><br><span class="line">codeblock:</span><br><span class="line">  # Code Highlight theme</span><br><span class="line">  # Available values: normal | night | night eighties | night blue | night bright | solarized | solarized dark | galactic</span><br><span class="line">  # See: https:&#x2F;&#x2F;github.com&#x2F;chriskempson&#x2F;tomorrow-theme</span><br><span class="line">  highlight_theme: night eighties     # 设置代码高亮主题</span><br><span class="line">  # Add copy button on codeblock</span><br><span class="line">  copy_button:</span><br><span class="line">    enable: true                # 增加复制按钮的开关</span><br><span class="line">    # Show text copy result.</span><br><span class="line">    show_result: true          # 点击复制完后是否显示 复制成功 结果提示</span><br><span class="line">    # Available values: default | flat | mac</span><br><span class="line">    style: mac</span><br></pre></td></tr></table></figure><h3 id="相关文章推荐"><a href="#相关文章推荐" class="headerlink" title="相关文章推荐"></a>相关文章推荐</h3><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br></pre></td><td class="code"><pre><span class="line"># ---------------------------------------------------------------</span><br><span class="line"># 相关文章推荐</span><br><span class="line"># npm install hexo-related-popular-posts --save</span><br><span class="line"># ---------------------------------------------------------------</span><br><span class="line"># Related popular posts</span><br><span class="line"># Dependencies: https:&#x2F;&#x2F;github.com&#x2F;tea3&#x2F;hexo-related-popular-posts</span><br><span class="line">related_posts:</span><br><span class="line">  enable: true</span><br><span class="line">  title: 相关文章推荐 # 自定义标题名字</span><br><span class="line">  display_in_home: false # 首页是否增加</span><br><span class="line">  params:</span><br><span class="line">    maxCount: 5 # 最多推荐几个</span><br><span class="line">    PPMixingRate: 0.4 # 同时推荐火热和相关，两者比率，不能为0</span><br><span class="line">    #isDate: false # 文章时间</span><br><span class="line">    #isImage: false # 文章配图</span><br><span class="line">    #isExcerpt: false # 文章摘要</span><br></pre></td></tr></table></figure><h3 id="文章原创申明"><a href="#文章原创申明" class="headerlink" title="文章原创申明"></a>文章原创申明</h3><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br></pre></td><td class="code"><pre><span class="line"># ---------------------------------------------------------------</span><br><span class="line"># 文章原创申明</span><br><span class="line"># ---------------------------------------------------------------</span><br><span class="line"># Creative Commons 4.0 International License.</span><br><span class="line"># See: https:&#x2F;&#x2F;creativecommons.org&#x2F;share-your-work&#x2F;licensing-types-examples</span><br><span class="line"># Available values of license: by | by-nc | by-nc-nd | by-nc-sa | by-nd | by-sa | zero</span><br><span class="line"># You can set a language value if you prefer a translated version of CC license, e.g. deed.zh</span><br><span class="line"># CC licenses are available in 39 languages, you can find the specific and correct abbreviation you need on https:&#x2F;&#x2F;creativecommons.org</span><br><span class="line">creative_commons:</span><br><span class="line">  license: by-nc-sa</span><br><span class="line">  sidebar: false</span><br><span class="line">  post: true</span><br><span class="line">  language:</span><br></pre></td></tr></table></figure><h3 id="修改底部作者图标为跳动的红心"><a href="#修改底部作者图标为跳动的红心" class="headerlink" title="修改底部作者图标为跳动的红心"></a>修改底部作者图标为跳动的红心</h3><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br></pre></td><td class="code"><pre><span class="line"># ---------------------------------------------------------------</span><br><span class="line"># 修改底部作者图标为跳动的红心</span><br><span class="line"># ---------------------------------------------------------------</span><br><span class="line">footer:</span><br><span class="line">  # Specify the date when the site was setup. If not defined, current year will be used.</span><br><span class="line">  #since: 2015</span><br><span class="line"></span><br><span class="line">  # Icon between year and copyright info.</span><br><span class="line">  icon:</span><br><span class="line">    # Icon name in Font Awesome. See: https:&#x2F;&#x2F;fontawesome.com&#x2F;icons</span><br><span class="line">    name: fa fa-heart</span><br><span class="line">    # If you want to animate the icon, set it to true.</span><br><span class="line">    animated: true</span><br><span class="line">    # Change the color of icon, using Hex Code.</span><br><span class="line">    color: &quot;#ff0000&quot;</span><br></pre></td></tr></table></figure><h3 id="图片弹出效果"><a href="#图片弹出效果" class="headerlink" title="图片弹出效果"></a>图片弹出效果</h3><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br></pre></td><td class="code"><pre><span class="line"># ---------------------------------------------------------------</span><br><span class="line"># 图片弹出效果 - fancybox</span><br><span class="line"># 实现该功能的基础是在文章中插入图片。</span><br><span class="line"># 该项功能的效果是：点击文中插图，图片能够放大，有幻灯片的效果</span><br><span class="line"># ---------------------------------------------------------------</span><br><span class="line"># FancyBox is a tool that offers a nice and elegant way to add zooming functionality for images.</span><br><span class="line"># For more information: https:&#x2F;&#x2F;fancyapps.com&#x2F;fancybox</span><br><span class="line">fancybox: true</span><br></pre></td></tr></table></figure><h3 id="配置微信，支付宝打赏"><a href="#配置微信，支付宝打赏" class="headerlink" title="配置微信，支付宝打赏"></a>配置微信，支付宝打赏</h3><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br></pre></td><td class="code"><pre><span class="line"># ---------------------------------------------------------------</span><br><span class="line"># 配置微信，支付宝打赏</span><br><span class="line"># ---------------------------------------------------------------</span><br><span class="line"># Reward (Donate)</span><br><span class="line"># Front-matter variable (unsupport animation).</span><br><span class="line">reward_settings:</span><br><span class="line">  # If true, reward will be displayed in every article by default.</span><br><span class="line">  enable: true</span><br><span class="line">  animation: false</span><br><span class="line">  #comment: Donate comment here.</span><br><span class="line"></span><br><span class="line">reward:</span><br><span class="line">  wechatpay: &#x2F;images&#x2F;wechatpay.png</span><br><span class="line">  alipay: &#x2F;images&#x2F;alipay.png</span><br><span class="line">  #paypal: &#x2F;images&#x2F;paypal.png</span><br><span class="line">  #bitcoin: &#x2F;images&#x2F;bitcoin.png</span><br></pre></td></tr></table></figure><h3 id="如何设置「阅读全文」"><a href="#如何设置「阅读全文」" class="headerlink" title="如何设置「阅读全文」"></a>如何设置「阅读全文」</h3><p><a href="https://theme-next.iissnan.com/faqs.html" target="_blank" rel="noopener">常见问题</a></p><p>建议使用 <code>&lt;!-- more --&gt;</code>（即第一种方式），除了可以精确控制需要显示的摘录内容以外， 这种方式也可以让 Hexo 中的插件更好的识别。</p><h3 id="自定义的文件位置"><a href="#自定义的文件位置" class="headerlink" title="自定义的文件位置"></a>自定义的文件位置</h3><p>自定义设置文件</p><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br></pre></td><td class="code"><pre><span class="line"># ---------------------------------------------------------------</span><br><span class="line"># 自定义的文件位置</span><br><span class="line"># ---------------------------------------------------------------</span><br><span class="line"># Define custom file paths.</span><br><span class="line"># Create your custom files in site directory &#96;source&#x2F;_data&#96; and uncomment needed files below.</span><br><span class="line">custom_file_path:</span><br><span class="line">  #head: source&#x2F;_data&#x2F;head.swig</span><br><span class="line">  #header: source&#x2F;_data&#x2F;header.swig</span><br><span class="line">  sidebar: source&#x2F;_data&#x2F;sidebar.swig</span><br><span class="line">  #postMeta: source&#x2F;_data&#x2F;post-meta.swig</span><br><span class="line">  #postBodyEnd: source&#x2F;_data&#x2F;post-body-end.swig</span><br><span class="line">  #footer: source&#x2F;_data&#x2F;footer.swig</span><br><span class="line">  #bodyEnd: source&#x2F;_data&#x2F;body-end.swig</span><br><span class="line">  variable: source&#x2F;_data&#x2F;variables.styl</span><br><span class="line">  #mixin: source&#x2F;_data&#x2F;mixins.styl</span><br><span class="line">  style: source&#x2F;_data&#x2F;styles.styl</span><br></pre></td></tr></table></figure><h3 id="近期文章"><a href="#近期文章" class="headerlink" title="近期文章"></a>近期文章</h3><p>添加 <code>source/_data/sidebar.swig</code></p><p>修改 <code>sidebar.swig</code></p><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br></pre></td><td class="code"><pre><span class="line">&#123;% if theme.recent_posts %&#125;</span><br><span class="line">    &lt;div class&#x3D;&quot;links-of-blogroll motion-element &#123;&#123; &quot;links-of-blogroll-&quot; + theme.recent_posts_layout  &#125;&#125;&quot;&gt;</span><br><span class="line">      &lt;div class&#x3D;&quot;links-of-blogroll-title&quot;&gt;</span><br><span class="line">        &lt;!-- modify icon to fire by szw --&gt;</span><br><span class="line">        &lt;i class&#x3D;&quot;fa fa-history fa-&#123;&#123; theme.recent_posts_icon | lower &#125;&#125;&quot; aria-hidden&#x3D;&quot;true&quot;&gt;&lt;&#x2F;i&gt;</span><br><span class="line">        &#123;&#123; theme.recent_posts_title &#125;&#125;</span><br><span class="line">      &lt;&#x2F;div&gt;</span><br><span class="line">      &lt;ul class&#x3D;&quot;links-of-blogroll-list&quot;&gt;</span><br><span class="line">        &#123;% set posts &#x3D; site.posts.sort(&#39;-date&#39;).toArray() %&#125;</span><br><span class="line">        &#123;% for post in posts.slice(&#39;0&#39;, &#39;5&#39;) %&#125;</span><br><span class="line">          &lt;li&gt;</span><br><span class="line">            &lt;a href&#x3D;&quot;&#123;&#123; url_for(post.path) &#125;&#125;&quot; title&#x3D;&quot;&#123;&#123; post.title &#125;&#125;&quot; target&#x3D;&quot;_blank&quot;&gt;&#123;&#123; post.title &#125;&#125;&lt;&#x2F;a&gt;</span><br><span class="line">          &lt;&#x2F;li&gt;</span><br><span class="line">        &#123;% endfor %&#125;</span><br><span class="line">      &lt;&#x2F;ul&gt;</span><br><span class="line">    &lt;&#x2F;div&gt;</span><br><span class="line">&#123;% endif %&#125;</span><br></pre></td></tr></table></figure><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br></pre></td><td class="code"><pre><span class="line"># ---------------------------------------------------------------</span><br><span class="line"># 近期文章</span><br><span class="line"># 添加自定义属性 </span><br><span class="line"># 添加 sidebar: source&#x2F;_data&#x2F;sidebar.swig</span><br><span class="line"># ---------------------------------------------------------------</span><br><span class="line">recent_posts_title: 近期文章</span><br><span class="line">recent_posts_layout: block</span><br><span class="line">recent_posts: true</span><br></pre></td></tr></table></figure><h3 id="Hexo-生成永久文章链接"><a href="#Hexo-生成永久文章链接" class="headerlink" title="Hexo 生成永久文章链接"></a>Hexo 生成永久文章链接</h3><ul><li>安装插件</li></ul><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">npm install hexo-abbrlink --save</span><br></pre></td></tr></table></figure><ul><li>修改 站点<code>_config.yml</code></li></ul><p>找到permalink 修改如下</p><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br></pre></td><td class="code"><pre><span class="line"># ---------------------------------------------------------------</span><br><span class="line"># Hexo 生成永久文章链接</span><br><span class="line"># ---------------------------------------------------------------</span><br><span class="line"># URL</span><br><span class="line">## If your site is put in a subdirectory, set url as &#39;http:&#x2F;&#x2F;yoursite.com&#x2F;child&#39; and root as &#39;&#x2F;child&#x2F;&#39;</span><br><span class="line">url: http:&#x2F;&#x2F;yoursite.com</span><br><span class="line">root: &#x2F;</span><br><span class="line"># permalink: :year&#x2F;:month&#x2F;:day&#x2F;:title&#x2F;</span><br><span class="line">permalink: posts&#x2F;:abbrlink&#x2F;</span><br><span class="line">abbrlink:  </span><br><span class="line">  alg: crc32  # 算法：crc16(default) and crc32</span><br><span class="line">  rep: hex    # 进制：dec(default) and hex</span><br><span class="line">permalink_defaults:</span><br><span class="line">pretty_urls:</span><br><span class="line">  trailing_index: true # Set to false to remove trailing &#39;index.html&#39; from permalinks</span><br><span class="line">  trailing_html: true # Set to false to remove trailing &#39;.html&#39; from permalinks</span><br></pre></td></tr></table></figure><ul><li>参考 <a href="https://zhuanlan.zhihu.com/p/134492757" target="_blank" rel="noopener">Hexo 生成永久文章链接</a></li></ul><h3 id="分割线样式-amp-amp-博客背景-amp-amp-文章内链接文本样式-amp-amp-文章内容的透明度设置-amp-amp-搜索框（local-search）的透明度设置"><a href="#分割线样式-amp-amp-博客背景-amp-amp-文章内链接文本样式-amp-amp-文章内容的透明度设置-amp-amp-搜索框（local-search）的透明度设置" class="headerlink" title="分割线样式 &amp;&amp; 博客背景 &amp;&amp; 文章内链接文本样式 &amp;&amp; 文章内容的透明度设置 &amp;&amp;  搜索框（local-search）的透明度设置"></a>分割线样式 &amp;&amp; 博客背景 &amp;&amp; 文章内链接文本样式 &amp;&amp; 文章内容的透明度设置 &amp;&amp; 搜索框（local-search）的透明度设置</h3><p>在 <code>source/_data/styles.styl</code>中设置</p><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br><span class="line">63</span><br><span class="line">64</span><br><span class="line">65</span><br><span class="line">66</span><br><span class="line">67</span><br><span class="line">68</span><br><span class="line">69</span><br><span class="line">70</span><br><span class="line">71</span><br><span class="line">72</span><br><span class="line">73</span><br><span class="line">74</span><br><span class="line">75</span><br><span class="line">76</span><br><span class="line">77</span><br><span class="line">78</span><br><span class="line">79</span><br><span class="line">80</span><br><span class="line">81</span><br><span class="line">82</span><br><span class="line">83</span><br><span class="line">84</span><br><span class="line">85</span><br><span class="line">86</span><br></pre></td><td class="code"><pre><span class="line">&#x2F;&#x2F;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;</span><br><span class="line">&#x2F;&#x2F; 设置背景图片</span><br><span class="line">&#x2F;&#x2F;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;</span><br><span class="line">body &#123;</span><br><span class="line">    &#x2F;&#x2F; 为图片路径，也可以直接使用链接</span><br><span class="line">    background:url(&#x2F;images&#x2F;background.jpg);    </span><br><span class="line">    &#x2F;&#x2F; 若果背景图片不能全屏，那么是否平铺显示，充满屏幕              </span><br><span class="line">    background-repeat: no-repeat;        </span><br><span class="line">    &#x2F;&#x2F; 背景是否随着网页上下滚动而滚动，fixed 为固定                    </span><br><span class="line">    background-attachment:fixed;   </span><br><span class="line">    &#x2F;&#x2F; 图片展示大小，这里设置 100%，100% 的意义为：如果背景图片不能全屏，那么是否通过拉伸的方式将背景强制拉伸至全屏显示                           </span><br><span class="line">    background-size: cover;                                  </span><br><span class="line">    background-position:50% 50%;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line">&#x2F;&#x2F;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;</span><br><span class="line">&#x2F;&#x2F; index页面中每篇文章相隔的那条线</span><br><span class="line">&#x2F;&#x2F;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;</span><br><span class="line">.posts-expand &#123;</span><br><span class="line">  .post-eof &#123;</span><br><span class="line">    display: block;</span><br><span class="line">    margin: $post-eof-margin-top auto $post-eof-margin-bottom;</span><br><span class="line">    width: 100%;</span><br><span class="line">    height: 1px;</span><br><span class="line">    background: $grey-light;</span><br><span class="line">    text-align: center;</span><br><span class="line">  &#125;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line">&#x2F;&#x2F;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;</span><br><span class="line">&#x2F;&#x2F; 文章内链接文本样式</span><br><span class="line">&#x2F;&#x2F;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;</span><br><span class="line">.post-body p a&#123;</span><br><span class="line">  color: #0593d3;</span><br><span class="line">  border-bottom: none;</span><br><span class="line">  border-bottom: 1px solid #0593d3;</span><br><span class="line">  &amp;:hover &#123;</span><br><span class="line">    color: #fc6423;</span><br><span class="line">    border-bottom: none;</span><br><span class="line">    border-bottom: 1px solid #fc6423;</span><br><span class="line">  &#125;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line">&#x2F;&#x2F;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;</span><br><span class="line">&#x2F;&#x2F; 文章内容的透明度设置</span><br><span class="line">&#x2F;&#x2F;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;</span><br><span class="line">.content-wrap &#123;</span><br><span class="line">  opacity: 0.9;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line">&#x2F;&#x2F;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;</span><br><span class="line">&#x2F;&#x2F; 侧边框的透明度设置</span><br><span class="line">&#x2F;&#x2F;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;</span><br><span class="line">.sidebar &#123;</span><br><span class="line">  opacity: 0.9;</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line">&#x2F;&#x2F;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;</span><br><span class="line">&#x2F;&#x2F; 菜单栏的透明度设置</span><br><span class="line">&#x2F;&#x2F;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;</span><br><span class="line">.header-inner &#123;</span><br><span class="line">  background: rgba(255,255,255,0.9);</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line">&#x2F;&#x2F;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;</span><br><span class="line">&#x2F;&#x2F; 搜索框（local-search）的透明度设置</span><br><span class="line">&#x2F;&#x2F;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;&#x3D;</span><br><span class="line">.popup &#123;</span><br><span class="line">  opacity: 0.9;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure><h3 id="不蒜子统计"><a href="#不蒜子统计" class="headerlink" title="不蒜子统计"></a>不蒜子统计</h3><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br></pre></td><td class="code"><pre><span class="line"># ---------------------------------------------------------------</span><br><span class="line"># 不蒜子统计功能</span><br><span class="line"># ---------------------------------------------------------------</span><br><span class="line">busuanzi_count:</span><br><span class="line">  enable: true # 是否开启busuanzi统计功能</span><br><span class="line">  total_visitors: true # 是否统计总访客数</span><br><span class="line">  total_visitors_icon: user # 访客数图标</span><br><span class="line">  total_views: true # 是否显示同级总访问次数</span><br><span class="line">  total_views_icon: eye # 总访问次数的图标</span><br><span class="line">  post_views: true # 是否显示单个文章查看次数</span><br><span class="line">  post_views_icon: eye # 文章被查看次数的图标</span><br></pre></td></tr></table></figure><h3 id="自定义统计文案"><a href="#自定义统计文案" class="headerlink" title="自定义统计文案"></a>自定义统计文案</h3><p>编辑<code>themes/next-v-7.4.2/layout/_partials/analytics/busuanzi-counter.swig</code></p><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br></pre></td><td class="code"><pre><span class="line">&#123;%- if theme.busuanzi_count.enable %&#125;</span><br><span class="line">&lt;div class&#x3D;&quot;busuanzi-count&quot;&gt;</span><br><span class="line">  &lt;script&#123;&#123; pjax &#125;&#125; async src&#x3D;&quot;https:&#x2F;&#x2F;busuanzi.ibruce.info&#x2F;busuanzi&#x2F;2.3&#x2F;busuanzi.pure.mini.js&quot;&gt;&lt;&#x2F;script&gt;</span><br><span class="line"></span><br><span class="line">  &#123;%- if theme.busuanzi_count.total_visitors %&#125;</span><br><span class="line">      &lt;span class&#x3D;&quot;site-uv&quot;&gt;</span><br><span class="line">        &#123;&#123; __(&#39;footer.total_visitors&#39;, &#39;&lt;span class&#x3D;&quot;busuanzi-value&quot; id&#x3D;&quot;busuanzi_value_site_uv&quot;&gt;&lt;&#x2F;span&gt;&#39;) &#125;&#125;</span><br><span class="line">      &lt;&#x2F;span&gt;</span><br><span class="line"></span><br><span class="line">  &#123;%- endif %&#125;</span><br><span class="line"></span><br><span class="line">  &#123;%- if theme.busuanzi_count.total_views %&#125;</span><br><span class="line">    &lt;span class&#x3D;&quot;site-pv&quot;&gt;</span><br><span class="line">     &#123;&#123; __(&#39;footer.total_views&#39;, &#39;&lt;span class&#x3D;&quot;busuanzi-value&quot; id&#x3D;&quot;busuanzi_value_site_pv&quot;&gt;&lt;&#x2F;span&gt;&#39;) &#125;&#125;</span><br><span class="line">    &lt;&#x2F;span&gt;</span><br><span class="line">  &#123;% endif %&#125;</span><br><span class="line">&lt;&#x2F;div&gt;</span><br><span class="line">&#123;%- endif %&#125;</span><br></pre></td></tr></table></figure><p>编辑：themes\next-v-7.4.2\languages\zh-CN.yml</p><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">footer:</span><br><span class="line">  total_views: &quot;历经 %s 次回眸才与你相遇&quot;</span><br><span class="line">  total_visitors: &quot;我的第 %s 位朋友，&quot;</span><br></pre></td></tr></table></figure><p>在自定义样式文件中添加如下样式</p><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">&#x2F;&#x2F;修改不蒜子数据颜色</span><br><span class="line">.busuanzi-value &#123;</span><br><span class="line">  color: #1890ff;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure><h2 id="发布到-Coding"><a href="#发布到-Coding" class="headerlink" title="发布到 Coding"></a>发布到 Coding</h2><h3 id="为何要使用Coding"><a href="#为何要使用Coding" class="headerlink" title="为何要使用Coding"></a>为何要使用Coding</h3><ul><li>国内 会比GitHub 快</li><li>相比 码云 主要是 不要钱，码云 一年99 太贵了</li></ul><h3 id="创建项目部署代码"><a href="#创建项目部署代码" class="headerlink" title="创建项目部署代码"></a>创建项目部署代码</h3><ul><li>注册 coding</li></ul><p>注册地址 <a href="https://coding.net" target="_blank" rel="noopener">coding</a> 使用微信登陆就行了，快捷方便</p><ul><li>创建项目</li></ul><p><img data-src="http://allens-blog.oss-cn-beijing.aliyuncs.com/2020-06-08-WeChat5c13b918517ef23b43563785d8b65503.png" alt=""></p><ul><li>添加 ssh</li></ul><p>点击头像 —&gt; 个人设置 —&gt; SSH 公钥 添加公钥</p><p>查看 mac 的 公钥</p><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">cat ~&#x2F;.ssh&#x2F;id_rsa.pub</span><br></pre></td></tr></table></figure><h3 id="修改配置文件"><a href="#修改配置文件" class="headerlink" title="修改配置文件"></a>修改配置文件</h3><p>打开配置文件，修改站点 <code>_config.yml</code>文件，修改最下面的<code>deploy</code>属性，设置部署的托管平台</p><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><span class="line"># Deployment</span><br><span class="line">## Docs: https:&#x2F;&#x2F;hexo.io&#x2F;docs&#x2F;deployment.html</span><br><span class="line">deploy:</span><br><span class="line"> - type: &#39;git&#39;</span><br><span class="line">   repo: </span><br><span class="line">      # 添加 coding 的 git  地址 </span><br><span class="line">      coding: git@e.coding.net:jianghaiyang&#x2F;blog.git</span><br><span class="line">      # github: git@github.com:JiangHaiYang01&#x2F;JiangHaiYang01.github.io.git</span><br><span class="line">   branch: master</span><br></pre></td></tr></table></figure><h3 id="发布-colding"><a href="#发布-colding" class="headerlink" title="发布 colding"></a>发布 colding</h3><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">hexo clean &amp;&amp; hexo g &amp;&amp; hexo deploy</span><br></pre></td></tr></table></figure><blockquote><p>如果提示 <code>ERROR Deployer not found: git</code> 就需要安装 git 插件</p></blockquote><p>执行下面命令</p><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">npm install --save hexo-deployer-git</span><br></pre></td></tr></table></figure><p>安装好以后再次执行 <code>hexo clean &amp;&amp; hexo g &amp;&amp; hexo deploy</code> 等待上传成功 刷新 coding 即可</p><h3 id="开启Pages服务"><a href="#开启Pages服务" class="headerlink" title="开启Pages服务"></a>开启Pages服务</h3><p>详细请参考 <a href="https://help.coding.net/docs/devops/cd/static-website.html" target="_blank" rel="noopener">如何搭建静态网站</a></p><blockquote><p>找不到构建与部署</p></blockquote><p>请点击左下角的 “项目设置”， 点击 “项目与成员”， 点击 “功能开关” 点击打开 “构建与部署” 右侧开关</p><h2 id="部署到-GitHub"><a href="#部署到-GitHub" class="headerlink" title="部署到 GitHub"></a>部署到 GitHub</h2><h3 id="创建-Github-仓库"><a href="#创建-Github-仓库" class="headerlink" title="创建 Github 仓库"></a>创建 Github 仓库</h3><ul><li>注册 Github 账号</li><li>New repository 创建新的存储仓库</li><li>在Repository name 中 填写 yourName + github.io</li></ul><p>例如我的</p><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">JiangHaiYang01.github.io</span><br></pre></td></tr></table></figure><h3 id="设置-Pages"><a href="#设置-Pages" class="headerlink" title="设置 Pages"></a>设置 Pages</h3><p>选择刚刚创建的 仓库 选择 <code>Settings</code>,在 <code>GitHub Pages</code>选项, 选择<code>Choose the Theme</code> 随便选择一个theme 保存提交</p><p>等待一会，在游览器上输入 <code>yourName.github.io</code> ，例如</p><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">JiangHaiYang01.github.io</span><br></pre></td></tr></table></figure><p>就能看到你自己的 博客了，</p><blockquote><p>需要等待一会 不会立马生效的</p></blockquote><h3 id="修改配置文件-1"><a href="#修改配置文件-1" class="headerlink" title="修改配置文件"></a>修改配置文件</h3><p>打开配置文件，修改站点 <code>_config.yml</code>文件，修改最下面的<code>deploy</code>属性，设置部署的托管平台</p><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br></pre></td><td class="code"><pre><span class="line"># Deployment</span><br><span class="line">## Docs: https:&#x2F;&#x2F;hexo.io&#x2F;docs&#x2F;deployment.html</span><br><span class="line">deploy:</span><br><span class="line"> - type: &#39;git&#39;</span><br><span class="line">   repo: </span><br><span class="line">      # 添加 coding 的 git  地址 </span><br><span class="line">      coding: git@e.coding.net:jianghaiyang&#x2F;blog.git</span><br><span class="line">      # 添加 github 的地址</span><br><span class="line">      github: git@github.com:JiangHaiYang01&#x2F;JiangHaiYang01.github.io.git</span><br><span class="line">   branch: master</span><br></pre></td></tr></table></figure><h3 id="发布-github"><a href="#发布-github" class="headerlink" title="发布 github"></a>发布 github</h3><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">hexo clean &amp;&amp; hexo g &amp;&amp; hexo deploy</span><br></pre></td></tr></table></figure><h2 id="其他优化项"><a href="#其他优化项" class="headerlink" title="其他优化项"></a>其他优化项</h2><h3 id="性能优化"><a href="#性能优化" class="headerlink" title="性能优化"></a>性能优化</h3><p><a href="https://tding.top/archives/7e5b094d.html" target="_blank" rel="noopener">Hexo-NexT 加载性能优化</a></p><h3 id="Hexo-博客展示-GitHub-Chart"><a href="#Hexo-博客展示-GitHub-Chart" class="headerlink" title="Hexo 博客展示 GitHub Chart"></a>Hexo 博客展示 GitHub Chart</h3><p><a href="https://tding.top/archives/90b9ba07.html" target="_blank" rel="noopener">Hexo 博客展示 GitHub Chart</a></p><h3 id="为hexo博客添加service-worker的功能"><a href="#为hexo博客添加service-worker的功能" class="headerlink" title="为hexo博客添加service worker的功能"></a>为hexo博客添加service worker的功能</h3><p><a href="https://www.wenjunjiang.win/2018/09/23/%E4%B8%BAhexo%E5%8D%9A%E5%AE%A2%E6%B7%BB%E5%8A%A0serviceworker%E7%9A%84%E5%8A%9F%E8%83%BD/" target="_blank" rel="noopener">为hexo博客添加service worker的功能</a></p><h3 id="Hexo-NexT-Tag-插件的使用"><a href="#Hexo-NexT-Tag-插件的使用" class="headerlink" title="Hexo-NexT Tag 插件的使用"></a>Hexo-NexT Tag 插件的使用</h3><p><a href="https://tding.top/archives/29bfe8c9.html" target="_blank" rel="noopener">Hexo-NexT Tag 插件的使用</a></p></div><div class="reward-container"><div></div><button onclick='var e=document.getElementById("qr");e.style.display="none"===e.style.display?"block":"none"'>打赏</button><div id="qr" style="display:none"><div style="display:inline-block"><img src="/images/wechatpay.png" alt="在雨季等你 微信支付"><p>微信支付</p></div><div style="display:inline-block"><img src="/images/alipay.png" alt="在雨季等你 支付宝"><p>支付宝</p></div></div></div><div><ul class="post-copyright"><li class="post-copyright-author"><strong>本文作者： </strong>在雨季等你</li><li class="post-copyright-link"><strong>本文链接：</strong> <a href="https://allens.icu/posts/f5a01bc1/" title="Hexo-Next主题配置">https://allens.icu/posts/f5a01bc1/</a></li><li class="post-copyright-license"><strong>版权声明： </strong>本博客所有文章除特别声明外，均采用 <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/" rel="noopener" target="_blank"><i class="fab fa-fw fa-creative-commons"></i>BY-NC-SA</a> 许可协议。转载请注明出处！</li></ul></div><footer class="post-footer"><div class="post-tags"><a href="/tags/Hexo/" rel="tag"># Hexo</a></div><div class="post-nav"><div class="post-nav-item"></div><div class="post-nav-item"><a href="/posts/67dff628/" rel="next" title="Android进程保活的前生今世">Android进程保活的前生今世 <i class="fa fa-chevron-right"></i></a></div></div></footer></article></div><div class="comments" id="valine-comments"></div><script>window.addEventListener('tabs:register', () => {
    let { activeClass } = CONFIG.comments;
    if (CONFIG.comments.storage) {
      activeClass = localStorage.getItem('comments_active') || activeClass;
    }
    if (activeClass) {
      let activeTab = document.querySelector(`a[href="#comment-${activeClass}"]`);
      if (activeTab) {
        activeTab.click();
      }
    }
  });
  if (CONFIG.comments.storage) {
    window.addEventListener('tabs:click', event => {
      if (!event.target.matches('.tabs-comment .tab-content .tab-pane')) return;
      let commentClass = event.target.classList[1];
      localStorage.setItem('comments_active', commentClass);
    });
  }</script></div><div class="toggle sidebar-toggle"><span class="toggle-line toggle-line-first"></span> <span class="toggle-line toggle-line-middle"></span> <span class="toggle-line toggle-line-last"></span></div><aside class="sidebar"><div class="sidebar-inner"><ul class="sidebar-nav motion-element"><li class="sidebar-nav-toc">文章目录</li><li class="sidebar-nav-overview">站点概览</li></ul><div class="post-toc-wrap sidebar-panel"><div class="post-toc motion-element"><ol class="nav"><li class="nav-item nav-level-2"><a class="nav-link" href="#下载-NexT"><span class="nav-number">1.</span> <span class="nav-text">下载 NexT</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#推荐使用git-下载"><span class="nav-number">1.1.</span> <span class="nav-text">推荐使用git 下载</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#下载zip"><span class="nav-number">1.2.</span> <span class="nav-text">下载zip</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#修改主题"><span class="nav-number">2.</span> <span class="nav-text">修改主题</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#添加-next-yml-文件"><span class="nav-number">2.1.</span> <span class="nav-text">添加 next.yml 文件</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#站点配置"><span class="nav-number">2.2.</span> <span class="nav-text">站点配置</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#修改主题配置主题"><span class="nav-number">2.3.</span> <span class="nav-text">修改主题配置主题</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#菜单设置为-菜单名-菜单目录-菜单图标名字"><span class="nav-number">2.4.</span> <span class="nav-text">菜单设置为 菜单名: &#x2F;菜单目录 || 菜单图标名字</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#社交栏设置"><span class="nav-number">2.5.</span> <span class="nav-text">社交栏设置</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#个人头像设置"><span class="nav-number">2.6.</span> <span class="nav-text">个人头像设置</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#站内搜索功能的实现"><span class="nav-number">2.7.</span> <span class="nav-text">站内搜索功能的实现</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#添加评论"><span class="nav-number">2.8.</span> <span class="nav-text">添加评论</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#首页文章属性"><span class="nav-number">2.9.</span> <span class="nav-text">首页文章属性</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#内容页里的代码块新增复制按钮"><span class="nav-number">2.10.</span> <span class="nav-text">内容页里的代码块新增复制按钮</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#相关文章推荐"><span class="nav-number">2.11.</span> <span class="nav-text">相关文章推荐</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#文章原创申明"><span class="nav-number">2.12.</span> <span class="nav-text">文章原创申明</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#修改底部作者图标为跳动的红心"><span class="nav-number">2.13.</span> <span class="nav-text">修改底部作者图标为跳动的红心</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#图片弹出效果"><span class="nav-number">2.14.</span> <span class="nav-text">图片弹出效果</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#配置微信，支付宝打赏"><span class="nav-number">2.15.</span> <span class="nav-text">配置微信，支付宝打赏</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#如何设置「阅读全文」"><span class="nav-number">2.16.</span> <span class="nav-text">如何设置「阅读全文」</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#自定义的文件位置"><span class="nav-number">2.17.</span> <span class="nav-text">自定义的文件位置</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#近期文章"><span class="nav-number">2.18.</span> <span class="nav-text">近期文章</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#Hexo-生成永久文章链接"><span class="nav-number">2.19.</span> <span class="nav-text">Hexo 生成永久文章链接</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#分割线样式-amp-amp-博客背景-amp-amp-文章内链接文本样式-amp-amp-文章内容的透明度设置-amp-amp-搜索框（local-search）的透明度设置"><span class="nav-number">2.20.</span> <span class="nav-text">分割线样式 &amp;&amp; 博客背景 &amp;&amp; 文章内链接文本样式 &amp;&amp; 文章内容的透明度设置 &amp;&amp; 搜索框（local-search）的透明度设置</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#不蒜子统计"><span class="nav-number">2.21.</span> <span class="nav-text">不蒜子统计</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#自定义统计文案"><span class="nav-number">2.22.</span> <span class="nav-text">自定义统计文案</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#发布到-Coding"><span class="nav-number">3.</span> <span class="nav-text">发布到 Coding</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#为何要使用Coding"><span class="nav-number">3.1.</span> <span class="nav-text">为何要使用Coding</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#创建项目部署代码"><span class="nav-number">3.2.</span> <span class="nav-text">创建项目部署代码</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#修改配置文件"><span class="nav-number">3.3.</span> <span class="nav-text">修改配置文件</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#发布-colding"><span class="nav-number">3.4.</span> <span class="nav-text">发布 colding</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#开启Pages服务"><span class="nav-number">3.5.</span> <span class="nav-text">开启Pages服务</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#部署到-GitHub"><span class="nav-number">4.</span> <span class="nav-text">部署到 GitHub</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#创建-Github-仓库"><span class="nav-number">4.1.</span> <span class="nav-text">创建 Github 仓库</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#设置-Pages"><span class="nav-number">4.2.</span> <span class="nav-text">设置 Pages</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#修改配置文件-1"><span class="nav-number">4.3.</span> <span class="nav-text">修改配置文件</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#发布-github"><span class="nav-number">4.4.</span> <span class="nav-text">发布 github</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#其他优化项"><span class="nav-number">5.</span> <span class="nav-text">其他优化项</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#性能优化"><span class="nav-number">5.1.</span> <span class="nav-text">性能优化</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#Hexo-博客展示-GitHub-Chart"><span class="nav-number">5.2.</span> <span class="nav-text">Hexo 博客展示 GitHub Chart</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#为hexo博客添加service-worker的功能"><span class="nav-number">5.3.</span> <span class="nav-text">为hexo博客添加service worker的功能</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#Hexo-NexT-Tag-插件的使用"><span class="nav-number">5.4.</span> <span class="nav-text">Hexo-NexT Tag 插件的使用</span></a></li></ol></li></ol></div></div><div class="site-overview-wrap sidebar-panel"><div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person"><img class="site-author-image" itemprop="image" alt="在雨季等你" src="/images/heard.jpg"><p class="site-author-name" itemprop="name">在雨季等你</p><div class="site-description" itemprop="description">分享是进步最快的方式</div></div><div class="site-state-wrap motion-element"><nav class="site-state"><div class="site-state-item site-state-posts"><a href="/archives/"><span class="site-state-item-count">23</span> <span class="site-state-item-name">日志</span></a></div><div class="site-state-item site-state-categories"><a href="/categories/"><span class="site-state-item-count">7</span> <span class="site-state-item-name">分类</span></a></div><div class="site-state-item site-state-tags"><a href="/tags/"><span class="site-state-item-count">6</span> <span class="site-state-item-name">标签</span></a></div></nav></div><div class="links-of-author motion-element"><span class="links-of-author-item"><a href="https://github.com/JiangHaiYang01" title="GitHub → https:&#x2F;&#x2F;github.com&#x2F;JiangHaiYang01" rel="noopener" target="_blank"><i class="github fa-fw"></i>GitHub</a> </span><span class="links-of-author-item"><a href="https://www.jianshu.com/u/142e8a9d9d71" title="简书 → https:&#x2F;&#x2F;www.jianshu.com&#x2F;u&#x2F;142e8a9d9d71" rel="noopener" target="_blank"><i class="heartbeat fa-fw"></i>简书</a> </span><span class="links-of-author-item"><a href="https://juejin.im/user/5ade713ef265da0b92653545/posts" title="掘金 → https:&#x2F;&#x2F;juejin.im&#x2F;user&#x2F;5ade713ef265da0b92653545&#x2F;posts" rel="noopener" target="_blank"><i class="heartbeat fa-fw"></i>掘金</a></span></div><div class="links-of-blogroll motion-element links-of-blogroll-block"><div class="links-of-blogroll-title"><i class="fa fa-history fa-" aria-hidden="true"></i> 近期文章</div><ul class="links-of-blogroll-list"><li><a href="/posts/51fd8696/" title="线程总结" target="_blank">线程总结</a></li><li><a href="/posts/dac154ea/" title="Jetpack之Navigation浅析" target="_blank">Jetpack之Navigation浅析</a></li><li><a href="/posts/6ef6837/" title="DataBinding 浅析" target="_blank">DataBinding 浅析</a></li><li><a href="/posts/1981ac2c/" title="文章总览" target="_blank">文章总览</a></li><li><a href="/posts/f6108cad/" title="反射浅析" target="_blank">反射浅析</a></li></ul></div></div><div class="back-to-top motion-element"><i class="fa fa-arrow-up"></i> <span>0%</span></div></div></aside><div id="sidebar-dimmer"></div></div></main><footer class="footer"><div class="footer-inner"><div class="copyright">&copy; 2018 – <span itemprop="copyrightYear">2020</span> <span class="with-love"><i class="fa fa-heart"></i> </span><span class="author" itemprop="copyrightHolder">在雨季等你</span></div></div></footer></div><script src="/lib/anime.min.js"></script><script src="//cdn.jsdelivr.net/npm/jquery@3/dist/jquery.min.js"></script><script src="//cdn.jsdelivr.net/gh/fancyapps/fancybox@3/dist/jquery.fancybox.min.js"></script><script src="//cdn.jsdelivr.net/npm/lozad@1/dist/lozad.min.js"></script><script src="/lib/velocity/velocity.min.js"></script><script src="/lib/velocity/velocity.ui.min.js"></script><script src="/js/utils.js"></script><script src="/js/motion.js"></script><script src="/js/schemes/pisces.js"></script><script src="/js/next-boot.js"></script><script>!function(){var e,t,o=document.getElementsByTagName("link");if(o.length>0)for(i=0;i<o.length;i++)"canonical"==o[i].rel.toLowerCase()&&o[i].href&&(e=o[i].href);t=e?e.split(":")[0]:window.location.protocol.split(":")[0],e||(e=window.location.href),!function(){var i=/([http|https]:\/\/[a-zA-Z0-9\_\.]+\.baidu\.com)/gi,o=e,r=document.referrer;if(!i.test(o)){var n="https"===String(t).toLowerCase()?"https://sp0.baidu.com/9_Q4simg2RQJ8t7jm9iCKT-xh_/s.gif":"//api.share.baidu.com/s.gif";r?(n+="?r="+encodeURIComponent(document.referrer),o&&(n+="&l="+o)):o&&(n+="?l="+o);var a=new Image;a.src=n}}(window)}()</script><script src="/js/local-search.js"></script><script src="//cdn.jsdelivr.net/npm/quicklink@1/dist/quicklink.umd.js"></script><script>window.addEventListener('load', () => {
      quicklink({
        timeout : 3000,
        priority: true,
        ignores : [uri => uri.includes('#'),uri => uri === 'https://allens.icu/posts/f5a01bc1/',]
      });
      });</script><script>NexT.utils.loadComments(document.querySelector('#valine-comments'), () => {
  NexT.utils.getScript('//unpkg.com/valine/dist/Valine.min.js', () => {
    var GUEST = ['nick', 'mail', 'link'];
    var guest = 'nick,mail,link';
    guest = guest.split(',').filter(item => {
      return GUEST.includes(item);
    });
    new Valine({
      el         : '#valine-comments',
      verify     : false,
      notify     : false,
      appId      : '6lUfyTDNhn0hAsWfRDnGKAV3-gzGzoHsz',
      appKey     : 'EsKctJGDiO5s9Dd5qQ4791DG',
      placeholder: "欢迎吐槽",
      avatar     : 'mm',
      meta       : guest,
      pageSize   : '10' || 10,
      visitor    : false,
      lang       : 'zh-cn' || 'zh-cn',
      path       : location.pathname,
      recordIP   : false,
      serverURLs : ''
    });
  }, window.Valine);
});</script></body></html><!-- rebuild by neat -->